package com.iyundao.io.controller;

import com.iyundao.io.Service.PersonalDetailsService;
import com.iyundao.io.tools.PersonalDetailsShow;
import com.iyundao.io.tools.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/details")
public class PersonalDetailsController {

    @Autowired
    private PersonalDetailsService personalDetailsService;

    @ApiOperation(value="获取个人详细信息", notes="获取个人详细信息")
    @RequestMapping(value = "/finddetails", produces = {"application/json;charset=UTF-8"})
    @CrossOrigin
    public ResponseData details(){
        PersonalDetailsShow personalDetailsShow = personalDetailsService.selectDetails();
        return new ResponseData(200,"成功",personalDetailsShow);
    }
}
